<?php
include_once "Factory/UndergraduateFactory.php";
include_once "Factory/VolunteerFactory.php";
use FactoryMethod\Factory\UndergraduateFactory;
use FactoryMethod\Factory\VolunteerFactory;

/** 学习雷锋的大学生 */
$undergraduate = new UndergraduateFactory();
$student = $undergraduate->createLeiFeng();
echo "大学生学习-" . $student->wash() . PHP_EOL;
echo "大学生学习-" . $student->buyRice() . PHP_EOL;
echo "大学生学习-" . $student->sweep() . PHP_EOL;

/** 学习雷锋的社区 */
$volunteer = new VolunteerFactory();
$v = $volunteer->createLeiFeng();
echo "社区学习-" . $v->wash() . PHP_EOL;
echo "社区学习-" . $v->buyRice() . PHP_EOL;
echo "社区学习-" . $v->sweep() . PHP_EOL;